package com.otp.Activity;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.otp.customUI.NavigationView;
import com.otp.util.Constants;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URI;

public class UserProfileActivity extends BaseActivity implements View.OnClickListener{

    private TextView backButton = null;
    private NavigationView navigationView = null;
    private Button logout = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_profile);
        backButton = (TextView) findViewById( R.id.iv_nav_back);
        navigationView = (NavigationView) findViewById(R.id.profileTile);
        navigationView.setTitle("用户信息");
        backButton.setOnClickListener(this);
        logout = (Button) findViewById(R.id.userLogout);
        logout.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.iv_nav_back:
                this.finish();
                ;break;
            case R.id.userLogout:
               getSharedPreferences(Constants.USER_DATA,0).edit().clear().commit();
                this.finish();
                ;break;

            default:break;
        }
    }


}
